<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="language" content="en" />

    <!-- blueprint CSS framework -->
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
    <!--[if lt IE 8]>
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
    <![endif]-->

    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />

    <title><?php echo CHtml::encode(Yii::app()->name); ?></title>
</head>

<body>
<div id="wrapper">
<div id="wrapper2">
<div class="container" id="page">

    <div id="topmenu">
        <?php $this->widget('zii.widgets.CMenu',array(
            'items'=>array(
                array('label'=>Yii::t('app','Home'), 'url'=>array('/site/index')),
                array('label'=>Yii::t('app','My page'), 'url'=>array('/account/page'), 'visible'=>!Yii::app()->user->isGuest),
                array('label'=>Yii::t('app','Projects'), 'url'=>array('/site/projects', 'view'=>'about')),
                array('label'=>Yii::t('app','Administration'), 'url'=>array('/admin/index'), 'visible'=>Yii::app()->user->isAdmin()),
                array('label'=>Yii::t('app','Help'), 'url'=>array('/site/guide')),
            ),
        )); ?>
        <div id="loggedas">
             <?php $this->widget('zii.widgets.CMenu',array(
                'items'=>array(
                    array('label'=>Yii::t('app','Sign in'), 'url'=>array('/account/login'), 'visible'=>Yii::app()->user->isGuest),
                    array('label'=>Yii::t('app','Register'), 'url'=>array('/account/register'), 'visible'=>Yii::app()->user->isGuest),
                    array('label'=>Yii::app()->user->name, 'url'=>array('/account/user'), 'template'=>'Logged in as {menu}', 'visible'=>!Yii::app()->user->isGuest),
                    array('label'=>Yii::t('app','My account'), 'url'=>array('/account/account'), 'visible'=>!Yii::app()->user->isGuest),
                    array('label'=>Yii::t('app','Sign out'), 'url'=>array('/account/logout'), 'visible'=>!Yii::app()->user->isGuest)
                ),
            )); ?>               
        </div>
    </div><!-- topmenu -->

    <div id="header">
        <div id="quick-search">
            <div class="form">
            <form action="/search" method="get">
                <a href="/search"><?php echo Yii::t('app','Search') ?></a>: <input id="q" size="20" type="text" />
            </form>
            </div>
        </div>
                
        <h1><?php echo CHtml::encode(Yii::app()->name); ?></h1>

        <div id="mainmenu">
            <?php if(isset($this->mainmenu)):?>
            <?php $this->widget('zii.widgets.CMenu',array(
                    'items'=>array(
                            array('label'=>Yii::t('app','Overview'), 'url'=>array('/site/overview')),
                            array('label'=>Yii::t('app','Download'), 'url'=>array('/site/download')),
                    ),
            )); ?>
            <?php endif?>
        </div><!-- mainmenu -->
    </div><!-- header -->

    <?php if(0): //if(isset($this->breadcrumbs)):?>
        <?php $this->widget('zii.widgets.CBreadcrumbs', array(
            'links'=>$this->breadcrumbs,
        )); ?><!-- breadcrumbs -->
    <?php endif?>

    <div <?php if($this->clips['sidebar']===NULL) echo 'class="nosidebar"'; ?> id="mainframe">
    <div id="sidebar">
        <?php echo $this->clips['sidebar']; ?>
    </div>
        <?php echo $content; ?>
    </div>

    <div class="clear"></div>

    <div id="footer">
    <div class="bgl">
    <div class="bgr">
        Copyright &copy; <?php echo date('Y'); ?> by Progideo. <?php echo Yii::powered(); ?>
    </div>
    </div>
    </div><!-- footer -->

</div><!-- page -->
</div>
</div>
</body>
</html>
